package com.example.myapplication;

import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;

public class ImageButtonActivity3 extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_image_button3);
        //设置样式
        ImageButton viewById = findViewById(R.id.ImageButton2);
        viewById.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
    }
}
